<?php $seasonId = intval($sf_user->getAttribute('activeSeasonId'));?>

<!-- TABS -->
<div class="tabs" id="tabs-news" style="position:relative;">

    <div class="tab active" id="tab-latest">Сүүлд нэмэгдсэн</div>
    <div class="tab" id="tab-top">Их уншсан</div>
    <br clear="all">
    <div class="c active" id="tab-latest-c">
        <?php $newss = Doctrine::getTable('News')->getPager(array('seasonId'=>$seasonId))?>
        <ul class="tiny-news-list">
          <?php foreach ($newss as $news):?>
            <li>
              <a href="<?php echo url_for('content/show?id='.$news->getId())?>"><?php echo $news?></a><br>
          	  <span class="timestamp"><?php echo time_ago($news->getCreatedAt())?></span>
        	  </li>
          <?php endforeach?>
          <li style="width:268px;">&nbsp;</li>
        </ul>
    </div>
    
    <div class="c" id="tab-top-c">
        <?php $newss = Doctrine::getTable('News')->getPager(array('seasonId'=>$seasonId, 'order'=>'nb_views DESC,'))?>
        <ul class="tiny-news-list">
          <?php foreach ($newss as $news):?>
            <li>
              <a href="<?php echo url_for('content/show?id='.$news->getId())?>"><?php echo $news?></a><br>
          	  <span class="timestamp"><?php echo time_ago($news->getCreatedAt())?></span>
        	  </li>
          <?php endforeach?>
          <li style="width:268px;">&nbsp;</li>
        </ul>
    </div>
</div><!--tabs-->

<br clear="all">